package com.ylr.admin.framework.mapper;

import com.ylr.admin.framework.entity.RoleMenuEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Set;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wyw
 * date: 2023-04-21 11:45:13
 * className: RoleMenuMapper
 * version: 1.0
 * description:
 */
public interface RoleMenuMapper extends BaseMapper<RoleMenuEntity> {

    /**
     * 查询角色已关联的菜单主键集合
     * @param roleId       角色主键
     * @param deleteStatus 删除状态
     * @return 菜单主键集合
     */
    Set<Long> findMenuIdSet(@Param("roleId") Long roleId, @Param("deleteStatus") Integer deleteStatus);

    /**
     * 查询菜单已关联的角色主键集合
     * @param menuId       菜单主键
     * @param deleteStatus 删除状态
     * @return 角色主键集合
     */
    Set<Long> findRoleIdSet(@Param("menuId") Long menuId, @Param("deleteStatus") Integer deleteStatus);
}
